package db.datasource;

import javax.sql.DataSource;

import utils.PropertiesUtil;

import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;

import db.common.DataSourceWrap;

public class MySQLAppDataSource extends DataSourceWrap {

	protected MySQLAppDataSource(DataSource ds) {
		super(ds);
		String url = PropertiesUtil.getProperties(
				MySQLAppDataSource.class
						.getResourceAsStream("MySQLAppDataSource.properties"))
				.getProperty("url");
		MysqlDataSource mds = (MysqlDataSource) ds;
		mds.setUrl(url);
	}

	public MySQLAppDataSource() {
		this(new MysqlDataSource());
	}

}
